package com.clqteam.daoimpl;

import java.sql.Connection;
import java.sql.PreparedStatement;
import java.sql.SQLException;

import com.clqteam.dao.DeletEmployeeDao;
import com.clqteam.util.JDBCutil;

public class DeletEmployeeDaoImpl implements DeletEmployeeDao{

	@Override
	public boolean deletEmployeeInfo(int eId) {
     boolean b=false;
       StringBuffer sql=new StringBuffer();
       sql.append(" DELETE FROM s_employee ");
       sql.append(" WHERE s_employee.eId=?");
       Connection con=JDBCutil.getConnection();
       try {
    	   PreparedStatement pst=con.prepareStatement(sql.toString());
    	     pst.setInt(1, eId);
    	    int i= pst.executeUpdate();
    	     if(i>0){
    	    	  b=true;
    	     }
    	   
	} catch (SQLException e) {
		e.printStackTrace();
	}
		return b;
	}

}
